package com.prs.crm.service.crm.impl;

import java.io.File;

import com.prs.crm.context.FileUtil;
import com.prs.crm.dao.crm.FeedbackReplyDao;
import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.crm.FeedbackReply;
import com.prs.crm.service.crm.FeedbackReplyService;
import com.prs.crm.service.impl.BaseServiceImpl;

public class FeedbackReplyServiceImpl extends BaseServiceImpl<FeedbackReply,FeedbackReplyDao> implements FeedbackReplyService{

	@Override
	public void submitFeedbackReply(FeedbackReply feedbackReply, File file,
			String fileName) {
		// TODO Auto-generated method stub
		Attachment attach = FileUtil.getInstance().createAttach(file, fileName);
		if(attach != null) {
			feedbackReply.setAttach(attach);
		}
		this.getDao().save(feedbackReply);
	}

}
